1. Field of the Invention
The present invention generally relates to an apparatus and method for efficiently translating virtual addresses utilizing either single address space or multiple address space models in a virtual memory management system. In particular, a virtual hash page table (VHPT), an extension of the translation lookaside buffer (TLB) hierarchy, is designed to enhance virtual address translation performance. In addition, the VHPT is also designed to be efficiently utilized with either multiple address space (linear page table per address space) or single address space (hashed page table) methods.
2. Description of Related Art
Virtual addresses must be mapped (translated) into physical addresses before they can be read or written. Due to the high frequency of such mappings, their size and performance is critical to the performance of the system as a whole. There are two basic types of mapping methods, the single address space (typically associated with a hashed page table), and multiple address space models (typically associated with page tables).
Operating systems create and maintain these mappings in data structures that are specific to the operating system. Hardware must have mappings organized in ways it understands. One such hardware structure that must understand the mapping structure is a Translation Lookaside Buffer (TLB), which is typically used to cache a small number of recently used translations where the central processing unit (CPU) can quickly access and apply them. The work in loading the cache with proper translations is split between the hardware and software. The balance of this split is highly dependent on a number of criteria, including the data structures used by the hardware and software to represent these mappings outside the TLB. The criteria is hardware architecture and implementation specific. The range varies between full hardware control over TLB insertion to full software control over TLB insertion.
Multiple-address-space based operating systems tend to use forward mapped page tables to store translations, and need a small amount of information per mapping. This can be made even more efficient if the page tables are allocated contiguously in virtual space, allowing a single linear lookup to find a translation. Windows NT is an example of such an operation system.
Single-address-space based operating systems need more information per mapping (e.g. protection domain information), and make more efficient use of a hashed page table. HP-UX, which is manufactured and commercially available from Hewlett Packard Company, USA, is an example of such an operating system.
Until now, processor architectures have lacked the ability to efficiently utilize both single-address and multiple-address space references for translation from virtual addresses to physical addresses, and match the operating system native format. Other processor architectures could either manage a virtual linear table, or a physical hash table, or a physical forward mapped page tables mappings. The present invention is the first time that support of translations, both single-address and multiple-address spaced models, from virtual addresses to physical addresses has been provided in virtual space.